<?php $this->pageTitle = '发表讨论 - ' . Yii::app()->name ?>
  <ul class="breadcrumb">
    <li><a href="/"><i class="fa fa-home"></i> 首页</a></li>
    <li class="active"><a href=""><i class="fa fa-file-text"></i> 发表讨论</a></li>
  </ul>
  <div class="panel panel-default">
    <div class="panel-heading"><i class="fa fa-file-text"></i> 发表讨论</div>
    <div class="panel-body">
      <form action="" class="form-horizontal" method="post">
        <div class="form-group">
          <label for="title" class="control-label col-md-1">主题</label>

          <div class="col-md-11">
            <input type="text" class="form-control" name="title" id="title" maxlength="40" required="" autofocus=""
                   placeholder="请输入帖子标题">
          </div>
        </div>
        <div class="form-group">
          <label for="content" class="control-label col-md-1">内容</label>

          <div class="col-md-11">
            <?php if ($this->isMobile()): ?>
              <textarea name="content" id="content" rows="8" class="form-control" placeholder="因移动端不支持富文本编辑器，故用文本域代替"></textarea>
            <?php else: ?>
              <script type="text/plain" id="editor" style="width:100%" name="content"></script>
            <?php endif ?>
          </div>
        </div>
        <div class="form-group">
          <div class="col-md-2 col-md-offset-1">
            <button type="submit" class="btn btn-info btn-block">发布帖子</button>
          </div>
        </div>
      </form>
    </div>
    <div class="panel-footer"><i class="fa fa-comment"></i> 请不要发表没有实际意义的帖子</div>
  </div>
<?php if (!$this->isMobile()): ?>
  <script>
    initUM('editor');
  </script>
<?php endif ?>